package com.cnap.multiclouldmgmt.util;

/**
 * @author dyq
 * 一些静态数据
 */
public interface CnapCloudMgmtConstants {

    //特殊操作，表明是自建的虚机
    String VM_FROM_INPUT = "vmInput";

    //节点pod配额
    int NODE_POD_QUOTA = 110;

    //事件保存最大长度，暂定2w条
    int EVENT_LIST_MAX_SIZE = 20000;

    //node上面用于标识节点类型的标签
    String CNAP_NODE_TYPE = "CNAP-node-type";
    
    //node上面用于标识节点架构的标签
    String CNAP_NODE_FRAMEWORK = "cnap-node-framework";

    //node上面用于标识节点的位置
    String CNAP_NODE_LOCATION = "cnap-node-location";

    //各种资源上用于做describe
    String CNAP_DESCRIBE = "cnap-describe";


    //工作负载类型-deployment
    String CNAP_WORKLOAD_KIND_DEPLOYMENT = "Deployment";


    //工作负载类型-ReplicaSet
    String CNAP_WORKLOAD_KIND_REPLICASET = "ReplicaSet";


    //工作负载类型-StatefulSet
    String CNAP_WORKLOAD_KIND_STATEFULSET = "StatefulSet";


    //工作负载类型-DaemonSet
    String CNAP_WORKLOAD_KIND_DAEMONSET = "DaemonSet";


    //默认命名空间
    String DEFAULT_NAMESPACE = "default";

    //容器状态-running
    String STATUS_RUNNING = "running";

    //容器状态-terminated
    String STATUS_TERMINATED = "terminated";

    //容器状态-waiting
    String STATUS_WAITING = "waiting";

    //pod状态正常
    String POD_STATUS_RUNNING = "Running";

    //硬盘iops最大值
    int DISK_MAX_IOPS = 9000;

    //硬盘读写速率最大值setDiskThroughput
    int DISK_MAX_THROUGHPUT = 100;

    //网络带宽
    int NODE_NET_BANDWIDTH = 1000 * 100000;

    //当前网络延迟常量
    int NET_DEALY = 5;

    //double 当前网络丢包率
    double NET_LOSS_RATE = 0.01;

    //flink 前缀
    String FLINK_PREFIX = "PREFIX_DEPLOY";

    //Spark前缀
    String SPARK_PREFIX = "SPARK_JOB_NAME";

    //表示应用是spark
    String SPARK_POD_LABEL = "spark-app-selector";

    //标识应节点的类型
    String NODE_APP_TYPE_LABEL = "cnap-app-type";

    //node上面用于标识节点架构的标签
    String CNAP_NODE_VMNAME = "cnap-node-vm-name";

    /**
     * 部署的应用的node的label
     */
    String NODE_APP_LABEL = "cnap-svc-name";

    /**
     * 部署的应用的node的label
     */
    String NODE_APP_LABEL_ID = "cnap-svc-id";

    /**
     * 部署的应用的node的label,遇到这个值可以直接部署
     */
    String NODE_APP_LABEL_EMPTY = "cnap-svc-empty";


    //VM标识是master的标识
    String CNAP_VM_MASTER = "vm-master";


    //VM标识是worker的标识
    String CNAP_VM_WORKER = "vm-worker";

    //node name前缀
    String CNAP_NODE_PREFIX = "node-";

    //node name前缀
    String TEST_ADMIN = "test-cnap";

    //该前缀表明是扩容用的svc
    String SCALE_SVC_PRE = "addNewResourceForScale";

    //该前缀表明是集群扩容用的svc
    String SCALE_CLUSTER_PRE = "scaleCluster";

    //循环跳出
    String BREAK_ASYNC = "break-async";

    //用来判断是不是独占
    String FORCED_ISOLATION = " forcedIsolation";

    //默认的等待处理的app_id
    String DEFAULT_WAIT_APP_ID = "-1";

    //迁移是发出的创建虚机请求前缀
    String MIGRATE_VM = "migrate-";

    //表明GPU还是CPU
    String ARCH_GPU = "GPU";
    String ARCH_CPU = "CPU";


    /**
     * 分片状态，上传中
     */
    public static final int PATCH_STATUS_UPLOADING = 0;

    /**
     * 分片状态，上传完成
     */
    public static final int PATCH_STATUS_FINISHED = 1;

    /**
     * 分片状态，上传完成
     */
    public static final int PATCH_STATUS_FAILED = 2;

    /**
     * 管理员账号
     */
    public static final String ADMIN_USER_NAME = "admin";

    /**
     * k8s配额
     */
    public static final String K8S_QUOTA_ADD = "apply";

    /**
     * k8s配额
     */
    public static final String K8S_QUOTA_DEL = "release";
}
